package com.gmscosmo.janus.lock;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName: RedissonProperties
 * Description:
 * Date: 2020/11/9 10:48
 *
 * @author stephen.qiu
 */
@Configuration
@ConfigurationProperties(prefix = "spring.redis")
public class RedissonProperties {
    private int timeout;

    private String host;

    private String port;

    private String password;

    private int database;

    @Value("${spring.redis.nodes}")
    private String clusterNodes;
    @Value("${spring.redis.jedis.pool.max-active}")
    private int connectionPoolSize;
    @Value("${spring.redis.jedis.pool.min-idle}")
    private int connectionMinimumIdleSize;

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getDatabase() {
        return database;
    }

    public void setDatabase(int database) {
        this.database = database;
    }

    public int getConnectionPoolSize() {
        return connectionPoolSize;
    }

    public void setConnectionPoolSize(int connectionPoolSize) {
        this.connectionPoolSize = connectionPoolSize;
    }

    public int getConnectionMinimumIdleSize() {
        return connectionMinimumIdleSize;
    }

    public void setConnectionMinimumIdleSize(int connectionMinimumIdleSize) {
        this.connectionMinimumIdleSize = connectionMinimumIdleSize;
    }

    public String getClusterNodes() {
        return clusterNodes;
    }

    public void setClusterNodes(String clusterNodes) {
        this.clusterNodes = clusterNodes;
    }
}
